mixin svg-images(...arg)

  -var contentWidth = images[0].width
  -var contentHeight = 0
  each idx in arg
    -contentHeight += images[idx].height

  -console.log(contentHeight, 'svg-images.pug')
  svg(style=`transform:rotateX(0);max-width:none!important;pointer-events:none`, 
    data-info="调试参数", opacity="0.5",
    viewBox=`0 0 ${contentWidth} ${contentHeight}`, 
    xmlns=`http://www.w3.org/2000/svg`, 
    xlink=`http://www.w3.org/1999/xlink`)
    g
      foreignObject(width=`100%`, height=`100%`, x=`0`, y=`0`)
        section(style=`user-select:text;overflow:hidden;text-align:center;line-height:0;`)
          each idx in arg
            -var {url, width, height} = images[idx]
            -console.log(idx, width, height, url,'svg-images.pug')
            svg(style=`background-image:url("${url}");background-size:100%;background-repeat:no-repeat;display:block;line-height:0;margin-top:-2px`, 
              viewBox=`0 0 ${width} ${height}`)
    block
